1. Field of the Invention
The invention relates generally to Fibre Channel Arbitrated Loop (FC-AL) subsystems and in particular relates to bridge devices and access fairness for devices coupled to the FC-AL communication medium through such a bridge device.
2. Discussion of Related Art
Fibre Channel (FC) communication media and protocols have long been utilized in high speed, high reliability storage system applications. The optical communication transmission communication medium provides enhanced security and noise immunity as compared to similar electrical communications standards. In one particular architecture of the Fibre Channel family of protocols, an arbitrated loop communication medium (i.e., FC-AL communication medium) couples all devices in a loop topology—one to the next. In such a loop topology, information is passed from a source device through all intermediate devices on the loop until an addressed destination device on the loop receives the information and processes it.
In such a loop topology, the FC-AL standards provide for an arbitration sequence such that a device requesting access to FC-AL communication medium applies an arbitration primitive to the loop. If an appropriate response is received on the loop, the device may understand that it has won the arbitration and has temporary exclusive access to the FC-AL communication medium for transmission of information.
In a typical FC storage system, an FC host system (i.e., a SCSI initiator) with an FC host bus adapter (HBA) communicates with a number of FC disk drives (i.e., SCSI targets) in an FC-AL topology. In this topology the FC HBA is normally assigned the Arbitrated Loop Physical Address (ALPA) of zero which is the highest priority within the FC-AL topology with the FC drives each assigned higher numbered (lower priority) Target ALPA (T-ALPA) values. In such a storage system the FC host initiates SCSI commands (e.g., read or write commands) to the FC disk target devices. Disk devices inherently require some processing time to respond to a command (e.g., latency). To increase overall system throughput the FC host could issue SCSI commands concurrently to multiple FC disk targets (or all of them). The FC disk drives then each perform their respective processing and eventually attempt to re-connect to the FC host to provide results of the command processing. This gives rise to the possibility that multiple target devices could be ready to provide a response at the same time. Due to the nature of the FC-AL topology only one target device can access the loop at a time to provide its response. The lowest T-ALPA value presently requesting access to the loop has the highest priority to access the arbitrated loop.
Since the higher priority target can potentially block lower priority targets from loop access the concept of access fairness was added to the FC-AL standard (FC-AL-2). In access fairness each loop port contains an ACCESS history variable. When this variable is true (logic 1) the loop port is allowed to arbitrate for the loop and when false (logic 0) the loop port is prevented from arbitrating for the loop. The ACCESS variable for a port is cleared when the loop port arbitrates and wins access to the loop. After winning such an arbitration this loop port cannot access the loop until again the “access window” closes (i.e., no other loop ports are arbitrating for the loop). Using this scheme a group of fair ports will effectuate a “round robin” priority order with each loop port getting only a single access to the FC-AL communication medium per open access window. This FC-AL standard approach allows all target devices on the loop equal access to the loop.
The access window is considered “open” when one or more fair loop ports are arbitrating for access to the loop, and is considered “closed” when the last loop port within the access window to win arbitration and access to the loop detects that no other loop port is arbitrating for the loop. A loop port winner determines this by using a special ALPA value (0xf0) as the current fill word (the FC word sent between frames) when it wins access to the loop. If another port on the loop is still arbitrating the ARB(0xf0) value will be replaced with the ARB(T-ALPA) value of the requesting target device's T-ALPA value. The present arbitration winner on the loop will detect this condition (i.e., does not see an ARB(0xf0) response that it generated on the loop). The present winner thus determines that the access window is still open. If the ARB(0xf0) value is returned to the loop winner it closes the access window by changing the currently fill word to IDLE for a least 2 FC word cycles. The idle fill words traverse the loop and all loop devices clear their respective ACCESS history variables thus allowing a new access window to begin.
Those of ordinary skill in the art are well aware of the FC-AL standards and protocols including the access fairness features provided in the FC-AL-2 standards. All FC and FC-AL standards are well known to those of ordinary skill in the art and are publicly available at, for example, www.t10.org and www.t11.org.
Adoption of lower cost Serial Attached SCSI (SAS) and Serial ATA (SATA) disk drives for storage systems has caused a shift away from more expensive FC drives within storage enclosures. However, in some environments there remains a substantial investment in FC architecture components such as FC HBAs and fiber optic media. To take advantage of the lower cost SAS/SATA disk drives, FC to SAS/SATA bridge or router devices have been developed which allow an FC host controller to communicate with a plurality of FC disk drives in an FC-AL topology though physically connected to the single FC-AL port of the bridging device.
A problem arises in that the bridging device must still provide fair loop access to the multiple T-ALPAs it represents along with other fair T-ALPA ports contained within the same physical loop (e.g., one or more other bridge devices and/or other actual FC drives coupled to the loop). Though a bridging device could be made to provide fair access within its own set of T-ALPAs it would not be able to provide fair access with other fair agents/devices on the loop.
For example, consider a bridging device representing ten T-ALPA values for a single FC port on an arbitrated loop with four other external independent loop ports (e.g., FC devices coupled to the loop each representing one T-ALPA per port). Assume further that these other ports have higher priority (lower T-ALPA values). Further, let's assume the T-ALPAs for all the ports (all fourteen ports for argument sake) have simultaneous requests to access the loop (e.g., multiple disk drives all seeking access to return information for a processed SCSI command). The bridging device will select the lowest of its ten T-ALPAs (i.e., the highest priority among the devices coupled through the bridge device) and arbitrate with the other four T-ALPA values on the loop. Due to the priority algorithm the four external ports win access to the loop ahead of the bridging device and then wait for the access window to close. The bridging device will then win access to the loop with its lowest T-ALPA value (highest priority) but also ends up closing the access window on itself even though it has nine other T-ALPAs with requests. There is no allowance in the existing FC-AL standards to be the current arbitration winner and to also make another, new access request. Because of this limitation, as soon as the bridging device is done with the request for its highest priority requesting T-ALPA the other external ports will be able to join in next access window. This ends up being unfair to the devices coupled to the loop through the bridging device. If instead there were ten separate ports for the ten devices coupled to the bridge, all ten T-ALPAs (plus the other four T-ALPAs) would have been able to access the loop within the access cycle before the window closed and allowed the other four external ports to have access to the loop again.
One approach to assuring access fairness to all devices is to limit an FC-AL system configuration to a single FC host coupled to the loop and a single bridge device through which all other devices are coupled to the loop. Such a configuration is highly inflexible and lacks the ability to easily scale a system.
Thus it is an ongoing challenge to provide fair access to devices coupled to an FC-AL communication medium through a bridge device.